Skip to content

Instantly share code, notes, and snippets.

import os
import sys
from contextlib import contextmanager
from copy import deepcopy
@contextmanager
def no_output():
original_stdout = sys.stdout
sys.stdout = open(os.devnull, "w")
@adham90
adham90 / archlinux_installation_guide.md
Last active May 18, 2024 22:15
Archlinux installation guide

#Arch Linux installation guide

  1. See what disk structure there is: $ lsblk
  2. Format boot partition: $ mkfs.ext4 /dev/sda<root> or use btrfs 😮
$ mkfs.btrfs -L "Arch" /dev/sda1
$ mount /dev/sda1 /mnt
#include <stdio.h>
#include <string.h>
#include <pulse/pulseaudio.h>
// Field list is here: http://0pointer.de/lennart/projects/pulseaudio/doxygen/structpa__sink__info.html
typedef struct pa_devicelist {
uint8_t initialized;
char name[512];
uint32_t index;
char description[256];
@TheCurle
TheCurle / Info.md
Last active May 18, 2024 22:12
[ForgeGradle] Updating the old toolchains; a why, how, and where.

RetroGradle

RetroGradle is an initiative to update the older ForgeGradle toolchains (1.x to 2.3) and the Minecraft versions associated with them, to use the more modern ForgeGradles (3.x and 4.x).
To do that requires a lot of time and scripting, but nothing is "complex".

1.12

The update for 1.12 to the FG3 toolchain is the benchmark for how we're going to do the other versions.
The repo update itself can be found here. The largest change here is the build.gradle script. You'll notice that it looks almost identical to the 1.16.x buildscript, with a few minor differences.
Those being, the MCP version (we'll get to that), the run configs using legacydev.Main(Client/Server) rather than userdev.Main, and some other small adjustments to make 1.12 happy.

@Pieeer1
Pieeer1 / LobbyJoiningExample.cs
Created January 6, 2024 01:28
Steam Multiplayer Peer with Facepunch Steamworks (C# API)
Lobby.Join(); // you are going to have to pull the lobby from somewhere. Run the callback for getting the lobby list somewhere
// holy shit terrible implementation eventually fix this
//this is due to the fact that a second connection does not have access to the lobby owner id until it is joined.
//fucking why???
Timer timer = new Timer();
AddChild(timer);
timer.OneShot = true;
timer.WaitTime = 1.0d;
@connordavenport
connordavenport / CentroidHull.py
Created December 3, 2023 17:08
a RF script to preview a glyphs "convex hull" and "centroid"...
from mojo.roboFont import RGlyph
from fontTools.pens.basePen import BasePen
from mojo.subscriber import Subscriber, registerGlyphEditorSubscriber, unregisterGlyphEditorSubscriber, listRegisteredSubscribers
from fontPens.flattenPen import flattenGlyph
from scipy.spatial import ConvexHull
class MyCopyDecomposingPen(BasePen):
def __init__(self, glyphSet, outPen):
super(MyCopyDecomposingPen, self).__init__(glyphSet)
self._moveTo = outPen.moveTo
@jacobbubu
jacobbubu / ioslocaleidentifiers.csv
Created February 15, 2012 14:41
iOS Locale Identifiers
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
ro_MD Romanian (Moldova)
@isomorphisms
isomorphisms / gist:3114ab86960656a729a6b4653001aae2
Created November 27, 2019 06:08
how to pull from docker hub using podman/buildah
On void linux.
Under `/etc/containers/` there is a file called `registries.conf`. It is complemented by `man 5 containers-registries.conf`.
Change (for me lines 11-12) which say
[registries.search]
registries = []
@juanbrujo
juanbrujo / PlayStationBIOSFilesNAEUJP.md
Last active May 18, 2024 21:57
Files for PlayStation BIOS Files NA-EU-JP